package org.abc.program.service.impl;

import org.abc.program.dao.admin.MenuDao;
import org.abc.program.entity.Menu;
import org.abc.program.service.MenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class MenuServiceImpl implements MenuService {

	@Resource
	private MenuDao dao;

	@Override
	public List<Menu> findList(Map<String, Object> map) {
		return dao.getMenus(map);
	}

	@Override
	public int getTotalCount(Map<String, Object> map) {
		return dao.getTotalCount(map);
	}

	@Override
	public int addMenu(Menu menu) {
		return dao.addMenu(menu);
	}

	@Override
	public List<Menu> findTopMenu() {
		return dao.getTopMenu();
	}

	@Override
	public List<Menu> findChilderList(Integer id) {
		return dao.getChilderList(id);
	}

	@Override
	public int edit(Menu menu) {
		return dao.editMenu(menu);
	}

	@Override
	public int delete(Integer id){
		return dao.deleteMenu(id);
	}

}
